<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <script type="text/javascript">
function sayHello(msg){
	Android.showToast(msg);
}

function getValue(){
   var val= document.ipForm.userName.value;
	//var arrVal= new Array(val,val,val);
    Android.receiveValueFromJs(val); 
}
function callAndroid(){
alert('called');
var abc = Android.sendValueToJs();
document.getElementById("txt").innerHTML=abc;
}

    </script>
    <title></title>
  </head>
  <body>
    <div onclick="alert('hello')">
      Click Me !!
    </div>
    <form name="ipForm" id="ipForm">
      UserName : <input type="text" name="userName"> <button type="button" onclick="getValue();">Submit</button>
    </form>
	<hr/>
	<div onclick="callAndroid();">Receive value from Android"</div>
	<div id="txt"></div>
  </body>
</html>
